using System;
using System.Threading.Tasks;
using hao_Dto.Product;

namespace Product.Service
{
    /// <summary>
    /// 商品留言服务接口
    /// </summary>
    public interface IProductCommentService
    {
        /// <summary>
        /// 获取商品留言列表
        /// </summary>
        /// <param name="queryDto">查询参数</param>
        /// <param name="currentUserId">当前用户ID（用于判断点赞状态）</param>
        /// <returns>留言列表</returns>
        Task<ProductCommentListDto> GetCommentsAsync(ProductCommentQueryDto queryDto, Guid? currentUserId = null);

        /// <summary>
        /// 创建留言
        /// </summary>
        /// <param name="createDto">创建留言DTO</param>
        /// <param name="userId">留言用户ID</param>
        /// <returns>创建的留言</returns>
        Task<ProductCommentDto> CreateCommentAsync(CreateProductCommentDto createDto, Guid userId);

        /// <summary>
        /// 点赞/取消点赞留言
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>操作结果</returns>
        Task<bool> ToggleLikeAsync(Guid commentId, Guid userId);

        /// <summary>
        /// 删除留言
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>删除结果</returns>
        Task<bool> DeleteCommentAsync(Guid commentId, Guid userId);

        /// <summary>
        /// 获取留言详情
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="currentUserId">当前用户ID</param>
        /// <returns>留言详情</returns>
        Task<ProductCommentDto> GetCommentAsync(Guid commentId, Guid? currentUserId = null);
    }
}